package com.qf.lanzhou.blog.api.pojo.entity;

import javax.xml.crypto.Data;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;

/**
 * @author 是柠檬甜
 * @ClassName Notification
 * @description 通知实体类
 * @date 2020/12/16 9:08
 * @modifier 是柠檬甜
 * @date 2020-12-16 9:08
 * @Version V1.0
 */
public class Notification {
    private Long notificationId;
    private Timestamp notificationTime;
    private String userName;
    private String notificationContent;
    private Long notificationStatus;
    private String notificationTimeStr;
    private static SimpleDateFormat sdf;
    @Override
    public String toString() {
        return "Notification{" +
                "notificationId=" + notificationId +
                ", notificationTime=" + notificationTime +
                ", userName='" + userName + '\'' +
                ", notificationContent='" + notificationContent + '\'' +
                ", notificationStatus=" + notificationStatus +
                '}';
    }

    public Long getNotificationId() {
        return notificationId;
    }

    public void setNotificationId(Long notificationId) {
        this.notificationId = notificationId;
    }

    public Timestamp getNotificationTime() {
        return notificationTime;
    }

    public void setNotificationTime(Timestamp notificationTime) {
        this.notificationTime = notificationTime;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getNotificationContent() {
        return notificationContent;
    }

    public void setNotificationContent(String notificationContent) {
        this.notificationContent = notificationContent;
    }

    public Long getNotificationStatus() {
        return notificationStatus;
    }

    public void setNotificationStatus(Long notificationStatus) {
        this.notificationStatus = notificationStatus;
    }

    public String getNotificationTimeStr() {
        return notificationTimeStr;
    }

    public void setNotificationTimeStr(Timestamp notificationTime) {
        sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String notificationTimeStr = sdf.format(notificationTime);
        this.notificationTimeStr = notificationTimeStr;
    }
}
